<script setup>
import useMainStore, {useCouterStore} from "./store/index";
const store = useMainStore();
const storeCount = useCouterStore()
</script>

<template>
  <div>
    <div>title: {{ store.title }}</div>
    <!-- 1. 通过$patch（）直接修改state中的属性 -->
    <button @click="store.$patch({ title: '大家好，才是真的好' })">
      modify Title
    </button>
    <button @click="store.$reset()">
     reset
    </button>
    <div>
      <!-- store.getter的方法名， -->
      日期：{{store.getCurrentDate}}
    </div>
    <div><button @click="store.modifyDate()">actions 中修改time状态</button></div>
    <div>
      count: {{storeCount.count}}
    </div>
  </div>
</template>

<style scoped>
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>
